package com.leizi.igym.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leizi.igym.domain.Category;
import com.leizi.igym.dto.CategoryAddDTO;
import com.leizi.igym.dto.CategoryDTO;
import com.leizi.igym.dto.CategoryPageQueryDTO;
import com.leizi.igym.resp.PageResult;
import com.leizi.igym.vo.CategoryCascaderVO;
import com.leizi.igym.vo.CategoryVO;

import java.util.List;

/**
* @author PC
* @description 针对表【t_category(分类总表)】的数据库操作Service
* @createDate 2024-04-07 17:57:07
*/
public interface CategoryService extends IService<Category> {

    boolean saveParentCategoryWithChild(CategoryAddDTO dto);

    boolean removeCategory(Long id);

    boolean updateCategory(CategoryDTO dto);

    List<CategoryVO> getCategoryWithChild();

    List<Long> getAllId();

    List<CategoryCascaderVO> getCategoryCascaderVO();

    QueryWrapper<Category> getPageQueryWrapper(CategoryPageQueryDTO dto);

    PageResult getPageWithChildren(CategoryPageQueryDTO dto);

    List<CategoryVO> getTopCategory();

    CategoryVO getByIdWithParent(Long id);
}
